//
//  RMMOrderCellView.m
//  Romomo
//
//  Created by puman on 2017/2/16.
//  Copyright © 2017年 mazegong. All rights reserved.
//

#import "RMMOrderCellView.h"

@implementation RMMOrderCellView

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = kWhiteColor;
        _imageV = [[UIImageView alloc] initWithFrame:CGRectMake(kRow, kRow, 60, 60)];
        _imageV.layer.masksToBounds = YES;
        _imageV.layer.cornerRadius = 5;
        [self addSubview:_imageV];
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(_imageV.right + kRow, _imageV.top, 2 *kHalf + kMaric, kMaric)];
        _titleLabel.textColor = COLORFROMCODE(0x2C2C2C, 1);
        _titleLabel.font = kFont(16);
        [self addSubview:_titleLabel];
        
        _timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(_imageV.right + kRow, _titleLabel.bottom, 3 * kHalf, kMaric)];
        _timeLabel.textColor = COLORFROMCODE(0x2C2C2C, 1);
        _timeLabel.font = kFont(13);
        [self addSubview:_timeLabel];
        
        _locationLabel = [[UILabel alloc] initWithFrame:CGRectMake(_imageV.right + kRow, _timeLabel.bottom, 3 * kHalf, kMaric)];
        _locationLabel.textColor = COLORFROMCODE(0x9B9B9B, 1);
        _locationLabel.font = kFont(13);
        [self addSubview:_locationLabel];
        
        _priceLabel = [[UILabel alloc] initWithFrame:CGRectMake(_titleLabel.right, _imageV.top, self.width - _titleLabel.right -kRow, 30)];
        _priceLabel.textColor = COLORFROMCODE(0x4A4A4A, 1);
        _priceLabel.font = kFont(16);
        _priceLabel.textAlignment = NSTextAlignmentRight;
        [self addSubview:_priceLabel];
        
        _qtyLabel = [[UILabel alloc] initWithFrame:CGRectMake(_titleLabel.right, _priceLabel.bottom, self.width - _titleLabel.right -kRow, 30)];
        _qtyLabel.textColor = COLORFROMCODE(0xB5B5B5, 1);
        _qtyLabel.font = kFont(13);
        _qtyLabel.textAlignment = NSTextAlignmentRight;
        [self addSubview:_qtyLabel];
    }
    return self;
}
- (void)setDic:(NSDictionary *)dic{
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
